package excption;

public class ThrowsDemo {    public static void main(String[] args) {
        Student zs=new Student();
    try {
        zs.setAge(23);
    } catch (IllegalAgeException e) {
        e.printStackTrace();
        System.out.println(e.getMessage());
    }
    System.out.println("此人年龄为"+zs.getAge());

    }
}
